<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ page import="java.io.* ,java.util.*, java.sql.*, Login.*"%>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>:: Shanti Chakra Foundation ::</title>
<link href="style.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</head>
<script language = "javascript">
  
  	function validate(form1)
	{
		
		var count = 0;
		var length = document.form1.rcheck.length ;
		for (i = 0 ; i < length ; i++)
		{ 
		if (document.form1.rcheck[i].checked == false)
		count = count + 1 ;
		
		if(count == length)
		{
			alert("Select any Record");
			document.getElementById("rcheck").focus;
			return false;
		}
	    }
		
		}
	function validate1(search1)
    { 
	if (search1.searchmem.value == "")
		{		
		alert("Enter search value ");
		return (false);
		}
	}
</script>

<body>
<p>
<a href="RegisteredMembers.jsp"> Back</a>
<%
int count = 0;
MySqlConnector ms = new MySqlConnector();
PreparedStatement stmt1;
ResultSet rs1 ;
ms.Connect();
// Inactive members
String q = " SELECT memberid , name, surname, sex, mobile, email  FROM registration where status = 0 ; " ;
stmt1 = ms.Connect().prepareStatement(q);
rs1 = stmt1.executeQuery();
%>
</p>

<form action="ListMembers1.jsp" name ="search1">
  <table width="435" height="41" bordercolor="#FFFFFF" >
    <tr>
    <tr>
      <h3 style="background-color:#CCCCCC">Search through Member id or Name of member.</h3>
    </tr>
  <td width="337"><div align="center"><span class="style1 style20"><strong>Enter Member ID: </strong></span>
    <input name="searchmem" id="searchmem" type="text">
    <input name="search" id = "search" type="submit" value="Search" onClick="return validate1(this.form)">  
  </div></td>
  </tr>
  </table>
</form>
<form name="form1" method="post" action = "ManageMembers" onSubmit="return validate(this.name)">
  <table width="679" border="1" align="left"  bordercolor="#FFFFFF" class="greenlink_no_left_padding">
    <tr>
      <td height="33" colspan="8" bgcolor="#333333" class="style4"><div align="center">
        <pre class="boldtext style1" align="center">InActive Members List </pre>
      </div></td>
    </tr>
    <tr>
      <td height="28" colspan="6" bgcolor="#333333" class="style1"><p><span class="style5"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     <input name="auser" type="submit" class="dash-link" id="auser" style="color:#000000; font-weight:bold;" value="Activate Member">
      </span><span class="style4">Select the member id below and click <strong>Activate Member</strong> button.</span></p></td>
    </tr>
    <tr>
      <td class="redtext">&nbsp;</td>
      <td class="redtext"><span class="style14">Member ID </span></td>
      <td class="redtext">Full Name </td>
      <td class="redtext">Gender</td>
      <td class="redtext"><span class="style13">Mobile</span></td>
      <td class="redtext"><span class="style13">Mail ID </span></td>
    </tr>
    <% 
 while(rs1.next()==true)
{  
%>
    <tr>
      <td width="23"><input name="rcheck" type="radio" value="<%=rs1.getString(1)%>" id="rcheck"></td>
      <td width="91" class="boldtext"><span class="style8"><%=rs1.getString(1)%> &nbsp;</span></td>
      <td width="171" class="boldtext"><span class="style8"><%=rs1.getString(2)%>. <%=rs1.getString(3)%></span></td>
      <td width="58" class="boldtext"><span class="style8"><%=rs1.getString(4)%></span></td>
      <td width="111" class="boldtext"><span class="style8"><%=rs1.getString(5)%></span></td>
      <td width="185" class="boldtext"><span class="style8"><%=rs1.getString(6)%></span></td>
    </tr>
    <% count = count + 1 ;   
}%>
    <tr align="right">
      <td height="22" colspan="6" bgcolor="#D8F2C9" ><div align="right"><span class="redtext">Total (<%=count%>)&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="style18" >&nbsp;&nbsp;&nbsp;&nbsp; </span> </div></td>
    </tr>
  </table>
</form>
</body>
</html>